num1 = int(input())
num2 = int(input())
print(num1 + num2)
print(num1 - num2)
print(num1 * num2)
if num2 == 0:
    print("无穷大")
else:
    print(num1 / num2)